load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_binary(
    name = "allocd_client",
    srcs = [
        "test/client.cpp",
    ],
    copts = COPTS,
    deps = [
        ":allocd_utils",
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/host/libs/config:logging",
        "//libbase",
        "@gflags",
        "@jsoncpp",
    ]
)

clang_tidy_test(
    name = "allocd_client_clang_tidy",
    srcs = [":allocd_client"],
    tags = ["clang_tidy", "clang-tidy"],
)

cc_library(
    name = "allocd_utils",
    srcs = [
        "utils.cpp",
    ],
    hdrs = [
        "request.h",
        "utils.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/host/libs/config:logging",
        "//libbase",
        "@jsoncpp",
    ],
)

clang_tidy_test(
    name = "allocd_utils_clang_tidy",
    srcs = [":allocd_utils"],
    tags = ["clang_tidy", "clang-tidy"],
)
